﻿#ifndef ORDERMANAGEMENTVIEW_H
#define ORDERMANAGEMENTVIEW_H
#include"XQWidget.h"
#include"OrderModel.h"
//订单管理视图
class OrderManagementView :public XQWidget
{
	Q_OBJECT
public:
	OrderManagementView(QWidget* parent = nullptr);
	~OrderManagementView();
public:
	XQTablePagingWidget* tableView()const;
	OrderModel order(qint64 index);
	void setOrder(qint64 index, const OrderModel& order);
	void setOrder(const QList<OrderModel>& list);
	void addOrder(const OrderModel& order);
	void removeOrder(const OrderModel& order);
	void clear();
	void showOrder(int page = 1);
	void updataTable();
public:
	//初始化
	virtual void init();
protected://初始化
	virtual void init_ui();
	void init_table();
	//QWidget* init_operateButton();//操作按钮
protected:
	XQTablePagingWidget* m_tableView = nullptr;
	/*QPushButton* m_addButton = nullptr;
	QPushButton* m_modifyButton = nullptr;
	QPushButton* m_removeButton = nullptr;*/
};
#endif // !CommodityManagementView